package org.example.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class WebIniter extends AbstractAnnotationConfigDispatcherServletInitializer {
//    获取根容器的配置类
    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[0];
    }

//    获取SpringMVC容器的配置表
    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{SpringMVCConfig.class};
    }

//    获取SpringMVC的访问路径
    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
